﻿using System;
using BUS;

public partial class UserControl_TopProducts : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadDataSource();
        }
    }

    private void LoadDataSource()
    {
        lvProducts.DataSource = SanPhamBUS.GetTopProducts();
        lvProducts.DataBind();
    }

    protected void DataPager1_PreRender(object sender, EventArgs e)
    {
        LoadDataSource();
    }
}
